﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using IkeCode.WP7.HQReader.Interfaces;
using Newtonsoft.Json;

namespace IkeCode.WP7.HQReader.Model
{
    /// <summary>
    /// Base model class.
    /// <para>
    /// Implements <see cref="IkeCode.WP7.HQReader.Interfaces.IIcBaseInterface">IIcBaseInterface</see>
    /// </para>
    /// </summary>
    [JsonObject(MemberSerialization.OptIn)]
    public class IcBaseModel
    {
        Guid _id;
        string _uniqueId;
        string _title;
        DateTime _insertDate;
        ICommand _defaultActionCommand;

        /// <summary>
        /// Feed ID
        /// </summary>
        [JsonProperty(PropertyName = "Id")]
        public Guid Id
        {
            get { return this._id; }
            set { this._id = value; }
        }

        /// <summary>
        /// Unique id (MD5)
        /// </summary>
        [JsonProperty(PropertyName = "UniqueId")]
        public string UniqueId
        {
            get { return this._uniqueId; }
            set { this._uniqueId = value; }
        }

        /// <summary>
        /// Feed Title
        /// </summary>
        [JsonProperty(PropertyName = "Title")]
        public string Title
        {
            get { return this._title; }
            set { this._title = value; }
        }

        /// <summary>
        /// Insertion date
        /// </summary>
        [JsonProperty(PropertyName = "InsertDate")]
        public DateTime InsertDate
        {
            get { return this._insertDate; }
            set { this._insertDate = value; }
        }

        /// <summary>
        /// Command for binding purposes
        /// </summary>
        public ICommand DefaultActionCommand
        {
            get { return this._defaultActionCommand; }
            set { this._defaultActionCommand = value; }
        }
    }
}
